#include <stdio.h>
#include "data.h"
#include "mfcc.h"
#include "conv2d.h"
#include <time.h>
#include "data.h"
#include "memory_management.h"

//模拟采样过程,获取4000个16位数据
void inputdata(void)
{ 
  u16 *in = 0;
  in = (u16 *)rampool;
  //printf("%ld\n",sizeof(yuyindata));
  //0-语音数据存入 内存池 里，大小为 8064字节
  memcpy(in,yuyindata,sizeof(yuyindata));
  //printf("%ld\n",sizeof(yuyindata));
 // for(int i = 0;i< 4032;i++)
  //{
  // printf("%d,",*(in+i)); 
 // }
 // printf("\n"); 
}

/*输出 正确值
0    0.000016

1    0.747810

2    0.021482

耗时: 0.001410 seconds
*/
void main(void)
{
  clock_t start, end;
  double cpu_time_used;
  start = clock();
  
  inputdata();
  frame_to_mfcc();
  Neural_Work();
  
  end = clock();
  cpu_time_used = ((double) (end - start)) / CLOCKS_PER_SEC;
  printf("耗时: %f seconds\n", cpu_time_used);
 
}
